package com.bit.cfdi.web.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Service;

import com.bit.cfdi.web.dao.SucursalDAO;
import com.bit.cfdi.web.domain.Sucursal;
@Service
public class SucursalService {

	@Autowired SucursalDAO sucursalDAO;
	
	public void save(Sucursal negocio) throws DataAccessException {
		sucursalDAO.save(negocio);
	}

	public Sucursal getById(Long id) throws DataAccessException {
		return sucursalDAO.getById(id);
	}

	public List<Sucursal> getAll() throws DataAccessException {
		return sucursalDAO.getAll();
	}

}
